As information technologies gradually develop, a mobile network carries an increasingly large data volume, and as a result, the mobile network often runs under an overload condition. A WLAN (wireless local area network) is supported by many terminals, and both deployment costs and operation costs are relatively low. How to connect to a mobile network by means of a WLAN is a method for establishing a network connection to which people pay attention.
Currently, there are two manners of establishing a network connection. Manner 1: An IPsec (Internet Protocol Security) tunnel is established for a terminal that connects to a WLAN, and then, control plane IKEv2 (Internet Key Exchange) related to IPsec security is established to exchange mobile network connection information with the terminal, so as to establish a network connection. Manner 2: Subscription information of a terminal that connects to a WLAN is obtained, and a mobile network address is assigned to the terminal according to the subscription information of the terminal, so that the terminal accesses a mobile network according to the assigned mobile network address, so as to establish a network connection.
During implementation of the present invention, it is found that the prior art has at least the following problems:
For Manner 1, technologies for establishing an IPSec tunnel and exchanging IKEv2 data are relatively complex, and have a relatively high requirement on the terminal, thereby narrowing an application range of network establishment. For Manner 2, because the mobile network address is assigned to the terminal according to the subscription information of the terminal, this manner of establishing a network connection is not sufficiently flexible, and a range of networks to which the terminal connects is limited.